 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="Cache-Control" content="No-Cache">
	<meta http-equiv="Pragma" content="No-Cache">

	<title>운세의 신</title>

	<link rel="stylesheet" type="text/css" href="/css/common.css">
	<link rel="stylesheet" type="text/css" href="/css/sub.css">
    <link rel="stylesheet" type="text/css" href="/css/mypage.css">

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			var content_tr = $("tr[name=content_tr]");
			content_tr.hide();
			$(".btn").each(function(index) {
				$(this).click(function() {
					content_tr.hide().eq(index).show();
				});
			});
		});
	</script>
</head>
<body>
<div id="wrap">
	<!-- Header -->
	<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/main_header.php'; ?>
	<!--// Header -->

	<!--커튼 데코레이션-->
	<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/drape.php'; ?>
	<!--//커튼 데코레이션-->
	
	<!--컨텐츠-->
	<div id="content">
		<!--휘장-->
		<div class="keybox1">
		</div>
		<!--휘장-->

		<!--왼쪽 컨텐츠-->
		<div class="assistant">
			<!--왼쪽 메뉴-->
			<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/inc_lnb.php'; ?>
			<!--// 왼쪽 메뉴-->
			
			<!--추천테마-->
			<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/theme.php'; ?>
			<!--//추천테마-->
			
			<!--오늘의 추천! 무료운세-->
			<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/free.php'; ?>
			<!--//오늘의 추천! 무료운세-->
			
			<!--후기게시판-->
            <div class="side">
			<?php echo $INC_POSTSCRIPT_LIST ?>
            </div>
			<!--//후기게시판-->
			
			<!--회원배너-->
			<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/static/member_join.php'; ?>
			<!--//회원배너-->
		</div>
		<!--//왼쪽 컨텐츠-->

		<!-- 메인컨텐츠-->
		<div class="cont">
			<div class="mypage">
            	<h3>결제내역</h3>
				<!--가입상품 요약 정보 (include mypage/summary_inc.v.php-->
				<?php echo $INC_SUMMARY; ?>
				<!--//가입상품 요약 정보-->
				
				<div class="text">
					<ul>
						<li>1:1문의하신 내역을 확인하실 수 있습니다.</li>
					</ul>
				</div>
				<div class="paylist">
					<table width="100%" summary="문의 내역" cellpadding="0" cellspacing="0">
						<caption class="blind">문의 내역</caption>
						<colgroup>
							<col width="*" />
							<col width="15%" />
							<col width="15%" />
							<col width="15%" />
						</colgroup>
						<thead>
							<tr>
								<th scope="col" class="date">작성일</th>
								<th scope="col" class="tle">제목</th>
								<th scope="col" class="situation">답변상태</th>
								<th scope="col" class="bill">내용보기</th>
							</tr>
						</thead>
						<tbody>
<?	foreach ($list as $item) : ?>
							<tr>
								<td class="date"><?=substr($item['create_dt'], 0,10)?></td>
								<td class="tle"><?=$item['subject']?></td>
								<td class="situation"><?=$item['reply_cnt'] > 0 ? '완료' : '대기'?></td>
								<td class="bill btn"><a href="javascript:;">열기</a></td>
							</tr>
							<tr name="content_tr">
								<td colspan="4">
									■ 문의 내용 ■
									<br/><br/>
									<?=str_replace("\n", "<br/>", $item['content'])?>
<?	foreach ($item['file'] as $file_item) : ?>
									<br/><br/>
									<img src="<?=$file_item['file_url']?>" />
<?	endforeach ?>

<?	foreach ($item['reply_list'] as $reply) : ?>
										<br/><br/>
										■ 답변 내용 ■
										<br/><br/>
										<?=str_replace("\n", "<br/>", $reply['content'])?>
<?	endforeach ?>
								</td>
							</tr>

<?	endforeach ?>
<?	if (count($list) == 0) :?>
							<tr>
								<td colspan="6">문의 내역이 없습니다.</td>
							</tr>
<?	endif ?>
						</tbody>
						<tfoot>
							<tr>
								<td colspan="6" class="bt_area"></td>
							</tr>
							<tr>
								<td colspan="6">
									<?	if (!empty($navi['prev_page_link'])) : ?>
										<a href="/<?=$navi['prev_page_link']?>" class="btn"><img src="/images/common/board/page_prev.png" alt="이전 페이지로" /></a> 
									<?	endif ?>
									
									<?	for ($i = 0; $i < count($navi['page_nums']); $i++) : ?>
									<?		if (!empty($navi['page_nums'][$i]['url'])) : ?>
												<a href="/<?=$navi['page_nums'][$i]['url']?>"><?=$navi['page_nums'][$i]['page_no']?></a>
									<?		else : ?>
												<a href="javascript:;" class="over"><?=$navi['page_nums'][$i]['page_no']?></a>
									<?		endif ?>
									<?	endfor ?>

									<?	if (!empty($navi['page_count'])) : ?>
										...<a href="/<?=$navi['page_count_link']?>"><?=$navi['page_count']?></a>
									<?	endif ?>

									<?	if (!empty($navi['next_page_link'])) : ?>
										<a href="/<?=$navi['next_page_link']?>" class="btn"><img src="/images/common/board/page_next.png" alt="다음 페이지로" /></a>
									<?	endif ?>
								</td>
							</tr>
						</tfoot>
					</table>
				</div><!--//paylist--> 
			</div><!--mypage--> 
		</div>
		<!--// 메인컨텐츠-->
	</div>
	<!--컨텐츠-->

	<!-- Footer -->
	<? include_once $_SERVER['DOCUMENT_ROOT'].'/include/commons/main_footer.php'; ?>
	<!--// Footer -->
</div>
</body>
</html>